package com.rany.day08.demo04;

import java.util.HashSet;

public class PersonTest {
    public static void main(String[] args) {
        HashSet<Person> hashSet = new HashSet<>();
        Person p = new Person();
        p.setName("zhangsan");
        p.setAge(26);
        Person p1 = new Person();
        p1.setName("zhangsan");
        p1.setAge(26);
        hashSet.add(p);
        hashSet.add(p1);
        System.out.println(hashSet);
    }
}
